inherited fListVenda: TfListVenda
  Left = 507
  Top = 240
  Caption = 'Listagem das Vendas'
  ClientHeight = 420
  ClientWidth = 519
  OldCreateOrder = True
  OnClose = FormClose
  PixelsPerInch = 96
  TextHeight = 13
  inherited Panel1: TPanel
    Width = 519
    inherited SpeedButton1: TSpeedButton
      Caption = 'Lancar'
      OnClick = SpeedButton1Click
    end
    inherited SpeedButton2: TSpeedButton
      OnClick = SpeedButton2Click
    end
    inherited SpeedButton3: TSpeedButton
      OnClick = SpeedButton3Click
    end
    inherited SpeedButton4: TSpeedButton
      Left = 451
    end
    object SpeedButton5: TSpeedButton
      Left = 216
      Top = 0
      Width = 72
      Height = 65
      Caption = 'Cancelar'
      Flat = True
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold]
      Glyph.Data = {
        760A0000424D760A000000000000360400002800000028000000280000000100
        08000000000040060000120B0000120B000000010000000100000203A600E5E5
        D900D7652400AE4E20007A433600D0B7A3009595C700000000006D6CF400AF92
        7900EFAD6B007360BC004949DE003C279100D6925A00A4755000DEDEDE007E59
        8E00B4B5C4000000D800FFFFF8004B2AAE00BBA99600ECAB7300E1BB9A009165
        3F00D68C51001D20C70083786E00E7B17B005F3DA4009999FF000F11BD009784
        BA007B7BF200B4B4FF00FCF4E500E69E5D00D0854800FFDE9B008484BE00AE9F
        94005858DF0012129C00A36670004433CD00F9BD7A00A4A4D700C2733A00C2C2
        EC002424B500CECEE8005F355D007A7A9F0093648A00CDCCD500B0613100B5B5
        E400896952002828D6000000EF00E7E7F10085858500D58E6600CF753D00B37E
        5100B5B5B500CCCCCC008484FF006A6AE5009E9FCD00EFDECE001010AF00DB8E
        4B00DDDDED008E5E43004444B000454596008C8CD700B1846900BCBBD5000000
        AC00A4978D00704186006362F200403FF6004949CE00EEA55B006A6A8E00BC5A
        27001A0FC4003232B800B46C3800F9C48F00CF9F6800E9CBB000DF814200AEAE
        D800EAD6C400E3B38F003333D7007575F200F6EEE70066669900F18B48002F30
        CD00F5AD62003535A600CEC8C400AE582C0075708100AEAEAE00F7F7F7000C0B
        C100C6683100C5C5C6008483DE00B97C6700F6B6740052337C008A545D005744
        B8009D9DDD00D6D6EE00C3AFC400E7A564008484AC00E6E6E600EFEFF0008E8F
        F1006D6DCF00EAD3BF00DCA26C006E6EB5006565D400B0858A005757A4001C1C
        D100CB662F0021178E005959F700C9C2BD00C1845200A1A1FF00FFFFFF00A962
        4100DEC3B300C27748000A0697000A0AB300B0A79E003A3AE60086665300FFD1
        8E00C5C6E5002828C300C1968000AC98C2007373FF00EABE8E00D6D6D6007A7A
        FF00DF995C005252DF00CDCDED000000FF00F69A4A00C3C3FC00FFB56D009797
        A700D38147001415B400B4B4CD006B6BA400A87C5B00EFA56400AA736E009D72
        4D00B5572900EAA86900833A5200DCDCFF005252F6000F06D3002317BC002626
        9B00F0E4D800D6D6CF00D79B64009494F2006A6AFC006363FE00C27944008383
        CE00CE7A42004142D2004930B000D8A984002727E700CA9B82008F7460008989
        E500EEE1DB00B5552300F5F5F000A98A7100BDB2AA009B9BC400E1995400EDED
        F600E5814200B5693400DDCDC000D36C33000707A4008C8CFF002519DA00633F
        61007171C600DE945C007473E8001510A4007070AA00B3B3E100F2B47300BBBB
        E900F8C38500A3A3DF00BEBEDF007272D200E26E2C00B6ACA400B87D6600BCA1
        9B00D2C1C600AF743D000A0AD000AE6A4A00AFAFE500CCCCFF00CEBFB600E6C3
        A7003D3DBE005D3E7D00B0B0BD008B827900E8DED500D7C6CB002020C0002829
        CC00E3944B00A75531009696BB00CC8651009595D800C9733000909090909090
        909090909090909090909090909090909090907F437373A07F90909090909090
        90909090909090909090909090909090909090909090909080AC854C6B6B6B6B
        887E73CC90909090909090909090909090909090909090909090909090909050
        4CD69571ECECEC7195D6B9351090909090909090909090909090909090909090
        9090909090CC06ABAB89893B64565664C63B20D6884390909090909090909090
        90909090909090909090909010AD00F8550CCF7343A0A012DA55B6F9004D4390
        909090909090909090909090909090909070104258D6F88CB62FCC14141414CC
        BBDAB6BE9B00677F90909090909090909090909090909070A06FF5988BF808BF
        DC8090909090909090BB2808A19B2BA914149090909090909090909090701042
        3E3A59B4952A4454E390909090909090907043C14445954D1090909090909090
        9090907010423EC83802D50DF8444454399090909090909090909012DC44692B
        F4909090909090909070106F3E3A3802D2A675DDC3D7A154A490909090909090
        90E433CCFC22A3007E90909090909070A06F3E9838E668570A6AB0D62AD79EDC
        4A909090909090901086453D01062A48AD709090909080421C4B38E6686A7676
        0A6AB0002A44BEC970334A909090909037E5BFC98001DA95ADCC90909090A0C8
        CB02D2AF762E2EE00A57B000A3A108E480E531903D903DD110C19EBEC9E4E548
        ADCC90909090CE03D549B3E076767676B357B0D60C9EDC102F457B80AC145050
        CC4665A1BEBE2A48DE70909090909C591A7DB3E076767676B35775DD64BF7A10
        DC224A104680374690AC22A19E9E0C007E90909090CCAE8ADB25B3E076767676
        AF570E0D20547A9A65814A372FD1A0467B3774449E9E69946E10909090109140
        A27D0AE07676760AAF25FA78D60C9E6544817B37613DA02F9A104E44A1549577
        C8A09090906CB2AAA27D0AE07676760AAF25AAFD4C9554A1D7BD7B7FE44AA0DF
        3110FE449E1B2B041690909090E7CB1AA27D0AE07676760A7D25C263A4ABAB54
        D78FE133331010E1E1EEBDA1695134B1109090909009591AA27D0A767676760A
        7DD0C26290E351488CD723EFB57B33A723D708F95177FB969090909080E8721A
        A27D0A767676760A7D490ECC9090EE3251F954441F8F1F4454972051F3300F10
        90909090A091400EA2B30A767676760A7DAAE87F9090907B823295201B1B1B20
        95AB6BD926D39690909090908D6DC20E25B3E0767676760A57FF152DF7909090
        904A4EF25B5B5BF2E59ACDEBAAB1109090909090E9CBAA0E25B3E0767676760A
        D0FF15A5D89D2490909090703D3D3D70906219FD5C299090909090704F5926DB
        250AE0767676760A266060533C3C79BA909090909090909090090F1AB1109090
        9090907FED721ADB250AE0E02E76B3B383F1FAA62CB73C697C14909090909090
        F6B1BC3029909090909090BBFB721ADB7D0AE02EE01D5FCC90904784573F1E3C
        130BCA9090909090CD41DB0F10909090909090F003301AA27D0AE0E018669090
        909090CC636AA836B73CC4EA141414D44B84C052909090909090901603C21AA2
        7D7D6347909090909090909090F1172E9CC4135A212490CD41250F4390909090
        9090909CCBC21AA28483909090909090909090909090471D99E211131379E9B1
        1D8E5270909090909090909C59260E18669090909090909090909090909090BA
        185D9987B813D95E17AEA090909090909090909293C5BA909090909090909090
        909090909090909090839F27C511C7E28E299090909090909090909066909090
        909090909090909090909090909090909090629F99995D170F10909090909090
        909090909090909090909090909090909090909090909090909090BA185D5D8E
        E790909090909090909090909090909090909090909090909090909090909090
        90909090905FBC05909090909090909090909090909090909090909090909090
        9090909090909090909090909090479090909090909090909090909090909090
        9090909090909090909090909090909090909090909090909090909090909090
        9090909090909090909090909090909090909090909090909090909090909090
        9090909090909090909090909090909090909090909090909090909090909090
        9090909090909090909090909090909090909090909090909090909090909090
        9090909090909090909090909090909090909090909090909090}
      Layout = blGlyphTop
      ParentFont = False
      OnClick = SpeedButton5Click
    end
  end
  inherited Panel2: TPanel
    Top = 339
    Width = 519
    Height = 81
    Visible = False
    inherited Label1: TLabel
      Left = 471
      Top = 33
      Visible = False
    end
    object RxLabel1: TRxLabel [1]
      Left = 7
      Top = 4
      Width = 68
      Height = 13
      Caption = 'Data Inicial'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object RxLabel2: TRxLabel [2]
      Left = 7
      Top = 41
      Width = 61
      Height = 13
      Caption = 'Data Final'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object RxLabel3: TRxLabel [3]
      Left = 111
      Top = 4
      Width = 42
      Height = 13
      Caption = 'Cliente'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold]
      ParentFont = False
    end
    inherited edtLocalizar: TEdit
      Left = 465
      Top = 7
      Width = 440
      Visible = False
    end
    object DataIni: TDateEdit
      Left = 7
      Top = 17
      Width = 89
      Height = 21
      NumGlyphs = 2
      TabOrder = 1
      OnExit = DataIniExit
    end
    object DataFin: TDateEdit
      Left = 7
      Top = 54
      Width = 89
      Height = 21
      NumGlyphs = 2
      TabOrder = 2
      OnExit = DataFinExit
    end
    object GroupBox1: TGroupBox
      Left = 112
      Top = 43
      Width = 324
      Height = 33
      Caption = 'Situa'#231#227'o'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold]
      ParentFont = False
      TabOrder = 3
      object rbFinalizado: TRadioButton
        Left = 8
        Top = 13
        Width = 113
        Height = 17
        Caption = 'Finalizado'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        ParentFont = False
        TabOrder = 0
        OnClick = rbFinalizadoClick
      end
      object rbCancelado: TRadioButton
        Left = 176
        Top = 13
        Width = 76
        Height = 17
        Caption = 'Cancelado'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        ParentFont = False
        TabOrder = 1
        OnClick = rbCanceladoClick
      end
      object rbNaoDefinido: TRadioButton
        Left = 82
        Top = 13
        Width = 85
        Height = 17
        Caption = 'N'#227'o Definido'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        ParentFont = False
        TabOrder = 2
        OnClick = rbNaoDefinidoClick
      end
      object rbTodos: TRadioButton
        Left = 261
        Top = 14
        Width = 53
        Height = 17
        Caption = 'Todos'
        Checked = True
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        ParentFont = False
        TabOrder = 3
        TabStop = True
        OnClick = rbTodosClick
      end
    end
    object Cliente: TRxDBLookupCombo
      Left = 112
      Top = 17
      Width = 325
      Height = 21
      DropDownCount = 8
      DataField = 'CLIENTE'
      LookupField = 'CLI_CODIGO'
      LookupDisplay = 'NOME'
      TabOrder = 4
    end
  end
  inherited DBGrid1: TRxDBGrid
    Width = 519
    Height = 273
    DataSource = DataSource1
    OnDrawColumnCell = DBGrid1DrawColumnCell
    Columns = <
      item
        Alignment = taCenter
        Expanded = False
        FieldName = 'NUM_NOTA'
        Title.Alignment = taCenter
        Title.Caption = 'Nota N'#186
        Width = 56
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'NOME'
        Title.Caption = 'Cliente'
        Width = 226
        Visible = True
      end
      item
        Alignment = taCenter
        Expanded = False
        FieldName = 'DATA'
        Title.Alignment = taCenter
        Title.Caption = 'Data'
        Width = 70
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'VALOR_TOTAL'
        Title.Alignment = taRightJustify
        Title.Caption = 'Valor Total'
        Width = 100
        Visible = True
      end
      item
        Alignment = taCenter
        Expanded = False
        FieldName = 'SITUACAO'
        Title.Alignment = taCenter
        Title.Caption = 'Sit'
        Width = 28
        Visible = True
      end>
  end
  object DataSource1: TDataSource
    DataSet = VendaConsulta
    Left = 136
    Top = 144
  end
  object VendaConsulta: TIBOQuery
    Params = <>
    DatabaseName = 'C:\Delphi7\Integrado\Dados\BANCO.GDB'
    DeleteSQL.Strings = (
      'DELETE FROM VENDA'
      'WHERE'
      '   CODIGO = :OLD_CODIGO')
    EditSQL.Strings = (
      'UPDATE VENDA SET'
      '   CODIGO = :CODIGO, /*PK*/'
      '   NUM_NOTA = :NUM_NOTA,'
      '   CLIENTE_FK = :CLIENTE_FK,'
      '   DATA = :DATA,'
      '   VENDEDOR_FK = :VENDEDOR_FK,'
      '   VALOR_TOTAL = :VALOR_TOTAL,'
      '   SITUACAO = :SITUACAO,'
      '   ADIC_PERC = :ADIC_PERC,'
      '   ADIC_VAL = :ADIC_VAL,'
      '   DESC_PERC = :DESC_PERC,'
      '   DESC_VAL = :DESC_VAL,'
      '   SUB_TOTAL = :SUB_TOTAL,'
      '   CONDICAO_PGTO_FK = :CONDICAO_PGTO_FK,'
      '   FATURADO = :FATURADO'
      'WHERE'
      '   CODIGO = :OLD_CODIGO')
    IB_Connection = dm.base
    InsertSQL.Strings = (
      'INSERT INTO VENDA('
      '   CODIGO, /*PK*/'
      '   NUM_NOTA,'
      '   CLIENTE_FK,'
      '   DATA,'
      '   VENDEDOR_FK,'
      '   VALOR_TOTAL,'
      '   SITUACAO,'
      '   ADIC_PERC,'
      '   ADIC_VAL,'
      '   DESC_PERC,'
      '   DESC_VAL,'
      '   SUB_TOTAL,'
      '   CONDICAO_PGTO_FK,'
      '   FATURADO)'
      'VALUES ('
      '   :CODIGO,'
      '   :NUM_NOTA,'
      '   :CLIENTE_FK,'
      '   :DATA,'
      '   :VENDEDOR_FK,'
      '   :VALOR_TOTAL,'
      '   :SITUACAO,'
      '   :ADIC_PERC,'
      '   :ADIC_VAL,'
      '   :DESC_PERC,'
      '   :DESC_VAL,'
      '   :SUB_TOTAL,'
      '   :CONDICAO_PGTO_FK,'
      '   :FATURADO)')
    RecordCountAccurate = True
    SQL.Strings = (
      'select venda.*,pessoa.nome from venda'
      'inner join pessoa on pessoa.codigo = venda.cliente_FK'
      'where venda.codigo in '
      '(select distinct venda_itens.venda_fk from venda_itens)'
      'order by venda.codigo desc')
    FieldOptions = []
    Left = 312
    Top = 16
    object VendaConsultaCODIGO: TIntegerField
      FieldName = 'CODIGO'
      Required = True
    end
    object VendaConsultaNUM_NOTA: TIntegerField
      FieldName = 'NUM_NOTA'
    end
    object VendaConsultaCLIENTE_FK: TIntegerField
      FieldName = 'CLIENTE_FK'
    end
    object VendaConsultaDATA: TDateField
      FieldName = 'DATA'
    end
    object VendaConsultaVENDEDOR_FK: TIntegerField
      FieldName = 'VENDEDOR_FK'
    end
    object VendaConsultaVALOR_TOTAL: TBCDField
      FieldName = 'VALOR_TOTAL'
      DisplayFormat = '##,###,#0.00'
      Size = 2
    end
    object VendaConsultaSITUACAO: TStringField
      FieldName = 'SITUACAO'
      Size = 1
    end
    object VendaConsultaADIC_PERC: TBCDField
      FieldName = 'ADIC_PERC'
      Size = 2
    end
    object VendaConsultaADIC_VAL: TBCDField
      FieldName = 'ADIC_VAL'
      Size = 2
    end
    object VendaConsultaDESC_PERC: TBCDField
      FieldName = 'DESC_PERC'
      Size = 2
    end
    object VendaConsultaDESC_VAL: TBCDField
      FieldName = 'DESC_VAL'
      Size = 2
    end
    object VendaConsultaSUB_TOTAL: TBCDField
      FieldName = 'SUB_TOTAL'
      Size = 2
    end
    object VendaConsultaCONDICAO_PGTO_FK: TIntegerField
      FieldName = 'CONDICAO_PGTO_FK'
    end
    object VendaConsultaFATURADO: TStringField
      FieldName = 'FATURADO'
      Size = 1
    end
    object VendaConsultaNOME: TStringField
      FieldName = 'NOME'
      Size = 100
    end
  end
  object deleta: TIBOQuery
    Params = <>
    DatabaseName = 'C:\Delphi7\Integrado\Dados\BANCO.GDB'
    DeleteSQL.Strings = (
      'DELETE FROM VENDA'
      'WHERE'
      '   COD_VENDA = :OLD_COD_VENDA')
    EditSQL.Strings = (
      'UPDATE VENDA SET'
      '   COD_VENDA = :COD_VENDA, /*PK*/'
      '   NUM_NOTA = :NUM_NOTA,'
      '   CLIENTE = :CLIENTE,'
      '   DATA = :DATA,'
      '   VENDEDOR = :VENDEDOR,'
      '   VALOR_TOTAL = :VALOR_TOTAL,'
      '   SITUACAO = :SITUACAO'
      'WHERE'
      '   COD_VENDA = :OLD_COD_VENDA')
    IB_Connection = dm.base
    InsertSQL.Strings = (
      'INSERT INTO VENDA('
      '   NUM_NOTA,'
      '   CLIENTE,'
      '   DATA,'
      '   VENDEDOR,'
      '   VALOR_TOTAL,'
      '   SITUACAO)'
      'VALUES ('
      '   :NUM_NOTA,'
      '   :CLIENTE,'
      '   :DATA,'
      '   :VENDEDOR,'
      '   :VALOR_TOTAL,'
      '   :SITUACAO)')
    RecordCountAccurate = True
    SQL.Strings = (
      'select venda.*,cliente.nome from venda'
      'inner join cliente on (cliente.cli_codigo = venda.cliente)'
      'order by venda.cod_venda desc')
    FieldOptions = []
    Left = 352
    Top = 16
    object IntegerField1: TIntegerField
      FieldName = 'COD_VENDA'
      Required = True
    end
    object IntegerField2: TIntegerField
      FieldName = 'NUM_NOTA'
      DisplayFormat = '0000'
    end
    object IntegerField3: TIntegerField
      FieldName = 'CLIENTE'
    end
    object DateField1: TDateField
      FieldName = 'DATA'
    end
    object IntegerField4: TIntegerField
      FieldName = 'VENDEDOR'
    end
    object BCDField1: TBCDField
      FieldName = 'VALOR_TOTAL'
      DisplayFormat = '##,##,#0.00'
      Size = 2
    end
    object StringField1: TStringField
      FieldName = 'SITUACAO'
      Size = 1
    end
    object StringField2: TStringField
      FieldName = 'NOME'
      Size = 100
    end
  end
end
